<?php
include(_DOC_ROOT.'classes/Content/Content.php');
include(_DOC_ROOT.'classes/Venue/Venue.php');
MyDB::$db->debug = true;
$venueSelected =' class="selected"';
$param = array();
$record_prepage = $param['record_perpage'] = ($_REQUEST['record_perpage'])?$_REQUEST['record_perpage']:3;
$url =_SITE_URL.'venues/?';
array_push($jsFiles,  'general.js','venue.js');
//array_push($cssFiles, 'gallery.css');
	$_tplName = array('venue-refine.tpl','venue-listing.tpl');
	//$brd_url['Packages'] = _SITE_URL.'packages/';
	//print_r($brd_url)
	$country_arr = getCountries();
	$wcategory_arr = Venue::getVenueType();
	if($_REQUEST['country'] != ''){
		$param['country'] = $_REQUEST['country'];
		$city_arr = getCities($_REQUEST['country']);
	}
	if($_REQUEST['city'] != '')
		$param['city'] = $_REQUEST['city'];
	if($_REQUEST['wcategory'] != ''){
		$param['wcategory'] = $_REQUEST['wcategory'];
	}
	if($_REQUEST['sort_venue'] != ''){
		$param['sort_venue'] = $_REQUEST['sort_venue'];
	}
	
	
	foreach($param as $k => $v)
		$url .= "$k=".$v.'&';
	$rowCount = Venue::getVenueCount($param);
	$paging = paging($rowCount,$url,$param['record_perpage']);
	$parr = Venue::getVenue($_limit,$param);
	$ranVenue = Venue::getVenueRandom('',2);
	//echo '<pre>';print_r($param);
	
$footer_links_tpl = 'footer_packages_links.tpl';
include(_SITE_TPL_PATH_.'site_main.tpl');
?>